<?php namespace Hdphp\Cache;

class Cache{
	
	//应用
	public $app;

	//缓存类型
	protected $driver;

	public function __construct($app)
	{
		$this->app = $app;
		$this->driver = ucfirst(Config::get('cache.type'));
	}

	//更改缓存驱动
	public function driver($driver)
	{
		$this->driver=$driver;
		return $this;
	}

	public function __call($method,$params)
	{
		$driver ='\Hdphp\Cache\\'.$this->driver;
		return call_user_func_array(array(new $driver,$method), $params);
	}
	
}